module.exports = async (ctx, next) =>{
    // 设置响应头 Content-Type
    ctx.set('Content-Type', 'application/json', 'charset=utf-8');
    // 允许跨域
    ctx.set('Access-Control-Allow-Origin', '*');
    ctx.set('Access-Control-Allow-Methods', 'OPTIONS, GET, PUT, POST, DELETE');
    // 设置响应体
    ctx.response.body = "{success: true, data: 'Hello World!'}";
    // 执行下一个中间件
    await next();
}